package org.giovanolli.mumi.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * The Class SpecialistTitle.
 */
@Entity
@Table(name = "specialist_title")
public class SpecialistTitle extends IdentificableEntity {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1270574851446247993L;

	/** The title. */
	@ManyToOne
	private Title title;

	/** The specialist. */
	@ManyToOne
	@JoinColumn(name = "specialist_id", updatable = false, insertable = false, nullable = false)
	private Specialist specialist;

	/** The license number. */
	@Column(name = "license_number")
	private String licenseNumber;

	/**
	 * Gets the license number.
	 * 
	 * @return the license number
	 */
	public String getLicenseNumber() {
		return licenseNumber;
	}

	/**
	 * Gets the specialist.
	 * 
	 * @return the specialist
	 */
	public Specialist getSpecialist() {
		return specialist;
	}

	/**
	 * Gets the title.
	 * 
	 * @return the title
	 */
	public Title getTitle() {
		return title;
	}

	/**
	 * Sets the license number.
	 * 
	 * @param licenseNumber
	 *            the new license number
	 */
	public void setLicenseNumber(String licenseNumber) {
		this.licenseNumber = licenseNumber;
	}

	/**
	 * Sets the specialist.
	 * 
	 * @param specialist
	 *            the new specialist
	 */
	public void setSpecialist(Specialist specialist) {
		this.specialist = specialist;
	}

	/**
	 * Sets the title.
	 * 
	 * @param title
	 *            the new title
	 */
	public void setTitle(Title title) {
		this.title = title;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.osoftware.mumi.dao.model.BaseObject#toString()
	 */
	@Override
	public String toString() {
		return "SpecialistTitle [title=" + title + ", licenseNumber=" + licenseNumber + ", toString()=" + super.toString() + "]";
	}

}
